<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="fragments/layout(title='入住',cssPaths='/static/css/baseinfo/yljg.css',jsPaths='/static/js/elder/elderly/ruzhuadd.js')">
<div class="right" th:fragment="right">
    <!--面包屑-->
    <div class="breadcrumb layui-bg-gray">
                <span class="layui-breadcrumb" lay-separator=">">
                      <a th:href="@{/}">首页</a>
                        <a href="/gbElderly/elist">老人管理</a>
                        <a><cite>入住</cite></a>
                </span>
    </div>

    <!--主体内容区-->
    <div class="form-content">
        <form class="layui-form" th:action="@{/checkinrecords/save}">
            <input type="text" name="buildingNo" hidden    th:value="${bedModeo.buildingName}">
            <input type="text" name="roomNo" hidden     th:value="${bedModeo.roomName}">
            <input type="text" name="bedNo" hidden   th:value="${bedModeo.code}">
            <input type="text" name="bedId" hidden  th:value="${bedModeo.id}">
            <div class="layui-form-item">
                <label class="layui-form-label">入住床位</label>
                <div class="layui-input-block">
                    <input type="text"  readonly   autocomplete="off" class="layui-input" th:value="${bedModeo.buildingName+bedModeo.roomName+'室'+bedModeo.code+'号床'}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">床位类型</label>
                <div class="layui-input-block">
                    <input type="text"  readonly  autocomplete="off" class="layui-input" th:if="${bedModeo.type !=0 }" th:value="${bedModeo.type==1 ? '普通床位' : '护理床位'}">
                    <input type="text"  readonly  autocomplete="off" class="layui-input" th:if="${bedModeo.typeName !=null }" th:value="${bedModeo.typeName}">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">入住老人</label>
                <div class="layui-input-inline">
                    <input type="text" name="elderlyName" id="elderlyName" readonly
                           lay-verify="required" placeholder="请点击选择老人姓名" autocomplete="off" class="layui-input">
                    <input type="hidden" name="elderlyId" id="elderlyId">
                    <input type="hidden" name="elderlyIdNo" id="elderlyIdNo">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">自理情况</label>
                <div class="layui-input-block">
                    <input type="text"  readonly  autocomplete="off" class="layui-input" id="healthCondition">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">护理部门</label>
                <div class="layui-input-block">
                    <select name="nursingDepartmentId"  lay-verify="required" >
                        <option value="">请选择护理部门</option>
                        <option th:each="h:${departments}" th:value="${h.id}" th:text="${h.name}"></option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label must">护理级别</label>
                <div class="layui-input-block">
                    <select name="mealId"  lay-verify="required" >
                        <option value="">请选择护理级别</option>
                        <option th:each="m:${meals}" th:value="${m.id}" th:text="${m.name}"></option>
                    </select>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn  layui-btn-normal" lay-submit lay-filter="submitBtn">保存</button>
                    <a href="/gbElderly/elist" class="layui-btn layui-btn-primary">返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
</html>